package van.planifolia.task;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by Intellij IDEA<br>
 * 定时任务类，需要将他注册到Spring容器中
 * @author Planifolia.Van
 * @version 1.0
 * @date 2022/11/18 16:03
 */
@Component
public class TimeTask {
    /**
     * 定时任务方法，需要在方法上添加注解 @Scheduled(cron="cron表达式")
     */
//    @Scheduled(cron = "0/5 * * * * ? ")
    public void test(){
        System.out.println("测试");
    }
}
